#ifndef APP_TIME_REC_H
#define APP_TIME_REC_H

#include "main.h"

typedef struct {
    unsigned char   year;
    unsigned char   month;
    unsigned char   day;   
    unsigned char   hour;
    unsigned char   mins;
    unsigned char   result;          
} app_time_rec_data_t;

typedef struct {
    unsigned int            crc;
    unsigned int            counts; //当前页 喂食数据 个数
    app_time_rec_data_t     DATA[20];
} app_time_rec_t;

typedef struct {
    unsigned int            sum_count;
} app_time_rec_mgr_t;

extern app_time_rec_t sg_time_rec[];
extern app_time_rec_mgr_t sg_time_rec_mgr;

void app_time_rec_init(void);
unsigned char app_time_rec_sumcount(void);
void app_time_rec_write(unsigned char result);
void app_clear_time_rec(void);

#endif